export default {
    data(){
        return {
            dialogFormVisible:false, 
            formLabelWidth: '120px',
            showLoading:true
        }
        
    },
    methods:{
        // 编辑操作
        handleEdit(index, row) {
            this.idx = index;
            this.form = row;
            this.title = '编辑';
            this.dialogFormVisible = true;
        },
        handleAdd(){
            this.form = {}
            this.title = '添加',
            this.dialogFormVisible = true;
        },
        // 获取日期
        getDate(date){
            let year = (date.getFullYear()).toString()
            let month = (date.getMonth()+1).toString()
            let day = (date.getDate()).toString()
            if(month.length < 2){
                month = '0'+month
            }
            if(day.length < 2){
                day = '0'+day
            }
            return `${year}-${month}-${day}`
        }
    }
}